package main.java.game.item.equipableTreasure;

import main.java.game.combatant.Hero;
import main.java.game.item.Weapon;
import main.java.game.item.WeaponType;


public class WeaponTreasure extends EquipableTreasure {

	private Weapon weapon;
	public WeaponTreasure (String name, Integer defenseValue, Integer attackValue, Integer initValue, Integer lpValue, Integer sellingPrice, Integer level, WeaponType type){
		super(name,defenseValue,attackValue,initValue,lpValue, sellingPrice, level);
		weapon=new Weapon(name, attackValue, initValue, null, type);
		
	}
	public void equip(Hero hero) {
		weapon.equip(hero);
		hero.getPlayer().getUsedTreasures().add(this);
		hero.getPlayer().getTreasures().remove(this);
	}

	
	public void unequip(Hero hero) {
		weapon.unequip(hero);
		hero.getPlayer().getTreasures().add(this);
		hero.getPlayer().getUsedTreasures().remove(this);
		
	}

}
